home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / asm / misc / execports / execports.readme next >
Text File  |  1980-01-03  |  2KB  |  34 lines

  1. ReadMe file about Exec ports.
  2.  
  3.     This  little  archive contains two sources (and exectuables): WaitPort.s and
  4. PutMsg.s.  I  hope  they'll  help  you to understand ports communication in Exec
  5. library.  Before  running  WaitPort, open two consoles (CLI or Shell). In one of
  6. them  run  WaitPort.  Well, nothing interesting will happen, but prompt will not
  7. return,  and  it'll  be  looking,  like WaitPort is still running. Then in other
  8. console run PutMsg program. You can also put some text as parameter, e.g.:
  9.  
  10.     1> PutMsg It's some stupid text...
  11.  
  12. and  press <Return>. Now look, what will happend in the first console - the text
  13. you  have just typed, shows in the another window! After this prompt will return
  14. in both consoles, and you can use them for anything else (e.g. closing... 8).
  15.     
  16.     The  question  is  -  what does it have in common with exec ports? Here's an
  17. explanation.
  18.     First source (WaitPort.s) creates new port called "Amsterdam" and adds it to
  19. the  system  public  ports  list. Then it waits for message(s) that will come to
  20. this  port.  And  if  you  run  now  PutMsg, it will look for public port called
  21. exactly  "Amsterdam".  If  it find it, then a message will be send to that port.
  22. The  message  contains  ID  header  (it's  string "CRMX", but it can be anything
  23. else),  length  of parameter string (it's 1 (one) if there's no parameters; this
  24. "one"  is  for  CR  code  $0a),  and  pointer to parameter string. WaitPort will
  25. receive  the  message,  reads  the  parameter, writes it on the console and send
  26. reply  message  to PutMsg task. After this, both programs will quit. Now, take a
  27. look  at the sources, to make everything clear. In case of any problems, you can
  28. write to me (I prefer EMail).
  29.  
  30.                                                                     - Cromax
  31.  
  32. EMail:    kita@sun10.ci.pwr.wroc.pl
  33. (c) 1994 by Tomislaw "Cromax" Kitynski
  34.